#ifndef __DHT11_H
#define __DHT11_H

#include "stm32f4xx.h"
#include "debug.h"

#define MyASSERT(X,Warningstr)  {if(X);else {printf("%s\r\n",Warningstr);}}

struct dht11
{
    GPIO_TypeDef*       gpio_port;
    uint32_t            gpio_pin;
    double              temperature;
    double              humidity;
};

typedef struct dht11*    DHT11_t;

extern DHT11_t WS_DHT;

int dht11_init(DHT11_t px_dht,GPIO_TypeDef* GPIOx,uint32_t GPIO_Pin);
int dht_receive_data(DHT11_t px_dht);

#endif /* __DHT11_H */
